-
-
Notifications
You must be signed in to change notification settings - Fork 3k
docs: clarify capture fixture precedence over -s #14053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The docs build failure appears to be unrelated to this change. |
|
@Zac-HD Could you please check if that what you had in mind for the issue? |
Zac-HD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - thanks for the PR, @Bubble-Interface!
(the CI failure looks unrelated to me)
|
The CI failure is being addressed in #14067. |
| .. note:: | ||
|
|
||
| When a capture fixture such as :fixture:`capsys` or :fixture:`capfd` is used, | ||
| it takes precedence over the global capturing configuration set via | ||
| command-line options such as ``-s`` or ``--capture=no``. | ||
|
|
||
| This means that output produced within a test using a capture fixture will | ||
| still be captured and available via ``readouterr()``, even if global capturing | ||
| is disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this note to the bottom of the page. This is a more advanced notice, and as it is now, it gets in the way of the explanation of the basics of the feature.
closes #13731
Clarify in the capturing tutorial that using capture fixtures such as
capsysorcapfdre-enables capturing for the duration of the test, even when global capturing is disabled via-sor--capture=no.